package com.wontube.smr.dao.providers;

import static org.apache.ibatis.jdbc.SqlBuilder.BEGIN;
import static org.apache.ibatis.jdbc.SqlBuilder.FROM;
import static org.apache.ibatis.jdbc.SqlBuilder.INNER_JOIN;
import static org.apache.ibatis.jdbc.SqlBuilder.SELECT;
import static org.apache.ibatis.jdbc.SqlBuilder.SQL;

import com.wontube.core.dao.mybatis.QueryExample;
import com.wontube.core.dao.mybatis.provider.SqlProvider;

public class GenreSqlProvider extends SqlProvider{
	public String selectGenreSiteWith(QueryExample example){		
		BEGIN();
		
		SELECT("genre_site.*, genre.genre_name");
		
		FROM("genre_site");
		
		INNER_JOIN("genre on genre_site.genre_id=genre.id");
		
		applyWhere(example, false);
		
		return SQL();
	}
}
